
- if @customer.nil?
  form method = 'get'
    .form-group
      .col-md-1
	    |车型:
	  .col-md-3	
	    - if params[:car_mo_check]
	      input type='text' value='#{@car_brand.name}/#{@car_model.name}' name='car_mo'
	    - else
	      input type='text' name='car_mo' required="required"
	    =link_to"", {:action => 'car_mo_check', :controller=>'car_brands', :remote=>true}, {class: 'btn btn-primary btn-xs glyphicon glyphicon-search'}
	  .col-md-1
	    |车牌号:
	  .col-md-3
	    input type='text' name='car_num' value='粤S' pattern="^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$"
	    =link_to"", {:action => 'customer_check', :controller=>'customers', :remote=>true}, {class: 'btn btn-primary btn-xs glyphicon glyphicon-search'}  
      .col-md-1
	    |客户姓名:
	  .col-md-3
	    input type='text' name='name' required="required"
	  .col-md-1
	    |手机号:
	  .col-md-3
	    input type='text' name='phone' required="required"
	  .col-md-1
	    |备注:
	  .col-md-3	
	    input type='text' name='note'
    
    br
      button type='submit' class="btn btn-primary btn-lg btn-block" name='save' style="margin-top:50px;" 下一步


- elsif @customer 
  
  form method = 'get'
    .form-group
      .col-md-1
	    |车型:
	  .col-md-3	
	    input type='text' value='#{@customer.car_mo}' disabled=true
	  .col-md-1
	    |车牌号:
	  .col-md-3
	    input type='text' value='#{@customer.car_num}'  disabled=true
	    =link_to"", {:action => 'customer_check', :controller=>'customers', :remote=>true}, {class: 'btn btn-primary btn-xs glyphicon glyphicon-search'}  
	    input type='text' value='#{@customer.car_num}' name='car_num' hidden=true
      .col-md-1
	    |客户姓名:
	  .col-md-3
	    input type='text' value='#{@customer.name}'  disabled=true
	  .col-md-1
	    |手机号:
	  .col-md-3
	    input type='text' value='#{@customer.phone}'  disabled=true 
	  .col-md-1
	    |备注:
	  .col-md-3	
	    input type='text' name='note'
    br
      button type='submit' class="btn btn-primary btn-lg btn-block" name='save' style="margin-top:50px;" 下一步